package game.groups.menus
{
	import flash.geom.Point;
	
	import game.classes.particles.displays.StarOutline;
	
	import org.flintparticles.common.actions.Age;
	import org.flintparticles.common.actions.Fade;
	import org.flintparticles.common.counters.Steady;
	import org.flintparticles.common.initializers.ColorsInit;
	import org.flintparticles.common.initializers.ImageClass;
	import org.flintparticles.common.initializers.Lifetime;
	import org.flintparticles.common.initializers.ScaleImageInit;
	import org.flintparticles.twoD.actions.Move;
	import org.flintparticles.twoD.actions.RandomDrift;
	import org.flintparticles.twoD.actions.RotateToDirection;
	import org.flintparticles.twoD.emitters.Emitter2D;
	import org.flintparticles.twoD.initializers.Velocity;
	import org.flintparticles.twoD.zones.DiscZone;
	
	public class Sparks extends Emitter2D
	{
		public function Sparks()
		{
			super();
			
			this.start();
			
			this.counter = new Steady(100);
			
			this.addInitializer(new ImageClass(StarOutline, [10, 4, 5, 2], true));
			this.addInitializer(new Velocity(new DiscZone(new Point(), 150, 100)));
			this.addInitializer(new ScaleImageInit(0.5, 1.5));
			this.addInitializer(new ColorsInit([0xFFFFFFFF, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF]));
			this.addInitializer(new Lifetime(3));
			
			this.addAction(new Age());
			this.addAction(new Fade());
			this.addAction(new Move());
			this.addAction(new RotateToDirection());
			this.addAction(new RandomDrift(200, 200));
		}
	}
}